#ifndef __KEY_H__
#define __KEY_H__

#include "stm32f10x.h"                  // Device header
#include "Delay.h"

#define KEY_PORT 	GPIOF	//GPIO F

#define KEY_HANG 0x000F	//0123
#define KEY1		GPIO_Pin_4
#define KEY2		GPIO_Pin_5
#define KEY3 		GPIO_Pin_6
#define KEY4 		GPIO_Pin_7

#define	Key1_Input	GPIO_ReadInputDataBit(KEY_PORT,KEY1)
#define	Key2_Input	GPIO_ReadInputDataBit(KEY_PORT,KEY2)
#define	Key3_Input	GPIO_ReadInputDataBit(KEY_PORT,KEY3)
#define	Key4_Input	GPIO_ReadInputDataBit(KEY_PORT,KEY4)

extern u8 Key_Flag;

void Key16_Init(void);
void Key16_porc(u8 *key);

#endif
